<template>
  <div class="add_dialog_content">
    <el-dialog :title="title" :visible="showDialog" :width="width" :close-on-click-modal="false" @close="close">
      <slot />
      <div slot="footer">
        <div class="top">
          <el-button v-if="!isShowBtn" @click="close" class="celBtn">取 消</el-button>
          <el-button v-if="!isShowBtn" class="addBtn" @click="btnOk">确 定</el-button>
          
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'AddDialog',
  props: {
    showDialog: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: '新增'
    },
    width: {
      type: String,
      default: '30%'
    },
    isShowBtn: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    close() {
      this.$emit('close')
    },
    btnOk() {
      this.$emit('btnOk')
    },
    btnReturn() {
      this.$emit('btnReturn')
    }
  }

}
</script>

<style scoped>
.add_dialog_content{
  background-color: #fff;
}
</style>
<style>

.el-dialog__header {
  border-bottom: 1px solid #bdbaba;
}

.el-dialog__title {
  font-size: 18px;
  color: #000;
}
div.el-dialog__footer{
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}
</style>
